<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><%=title%></title>
</head>
<body>
    <a href="/view/edit?title=添加">添加</a>
    <table border="1">
            <tr>
                <th>id</th>
                <th>name</th>
                <th>pwd</th>
                <th colspan="2">操作</th>
            </tr>
        <% items.forEach(function(item){%>
            <tr>
                <td><%=item._id%></td>
                <td><%=item.name%></td>
                <td><%=item.password%></td>
                <td><a href="/user/del?id=<%=item._id%>">删除</a></td>
                <td><a href="/user/edit/<%=item._id%>">修改</a></td>
            </tr>
        <% }) %>
    </table>
    <a <% if(page-1 != 0){%>href="/user/sel?page=<%=page-1%>"<%}%>>上一页</a>
    <a <% if(parseInt(page) != total){%>href="/user/sel?page=<%=parseInt(page)+1%>"<%}%>>下一页</a>
</body>
</html>